CREATE  sequence discipline_seq start WITH 1 increment BY 1;

CREATE OR REPLACE TRIGGER discipline_id_trig
BEFORE INSERT ON DISCIPLINE
FOR EACH ROW
BEGIN
    select discipline_seq.nextval INTO :new.DISCIPLINE_ID FROM dual;
END;

CREATE SEQUENCE game_seq start WITH 1 increment BY 1;

CREATE OR REPLACE TRIGGER game_id_trig
BEFORE INSERT ON GAME
FOR EACH ROW
BEGIN
    select game_seq.nextval INTO :new.GAME_ID FROM dual;
END;

CREATE  SEQUENCE gamecontract_seq start WITH 1 increment BY 1;

CREATE OR REPLACE TRIGGER gamecontract_id_trig
BEFORE INSERT ON GAME_CONTRACT
FOR EACH ROW
BEGIN
    select gamecontract_seq.nextval INTO :new.GAME_CONTRACT_ID FROM dual;
END;

CREATE  SEQUENCE league_seq start WITH 1 increment BY 1;

CREATE OR REPLACE TRIGGER league_id_trig
BEFORE INSERT ON LEAGUE
FOR EACH ROW
BEGIN
    select league_seq.nextval INTO :new.LEAGUE_ID FROM dual;
END;

CREATE  SEQUENCE player_seq start WITH 1 increment BY 1;

CREATE OR REPLACE TRIGGER player_id_trig
BEFORE INSERT ON PLAYER
FOR EACH ROW
BEGIN
    select player_seq.nextval INTO :new.PLAYER_ID FROM dual;
END;

CREATE  SEQUENCE rating_seq start WITH 1 increment BY 1;

CREATE OR REPLACE TRIGGER rating_id_trig
BEFORE INSERT ON RATING
FOR EACH ROW
BEGIN
    select rating_seq.nextval INTO :new.RATING_ID FROM dual;
END;

CREATE  SEQUENCE sysgroup_seq start WITH 1 increment BY 1;

CREATE OR REPLACE TRIGGER sysgroup_id_trig
BEFORE INSERT ON SYS_GROUP
FOR EACH ROW
BEGIN
    select sysgroup_seq.nextval INTO :new.SYS_GROUP_ID FROM dual;
END;

CREATE  SEQUENCE sysuser_seq start WITH 1 increment BY 1;

CREATE OR REPLACE TRIGGER sysuser_id_trig
BEFORE INSERT ON SYS_USER
FOR EACH ROW
BEGIN
    select sysuser_seq.nextval INTO :new.SYS_USER_ID FROM dual;
END;

CREATE  SEQUENCE team_seq start WITH 1 increment BY 1;

CREATE OR REPLACE TRIGGER team_id_trig
BEFORE INSERT ON TEAM
FOR EACH ROW
BEGIN
    select team_seq.nextval INTO :new.TEAM_ID FROM dual;
END;

CREATE  SEQUENCE teamcontract_seq start WITH 1 increment BY 1;

CREATE OR REPLACE TRIGGER teamcontract_id_trig
BEFORE INSERT ON TEAM_CONTRACT
FOR EACH ROW
BEGIN
    select teamcontract_seq.nextval INTO :new.TEAM_CONTRACT_ID FROM dual;
END;

CREATE SEQUENCE tournament_seq start WITH 1 increment BY 1;

CREATE OR REPLACE TRIGGER tournament_id_trig
BEFORE INSERT ON TOURNAMENT
FOR EACH ROW
BEGIN
    select tournament_seq.nextval INTO :new.TOURNAMENT_ID FROM dual;
END;